<template>
    <el-image v-bind="imageProps" style="width:120px;height:80px;line-height: 80px;" fit="cover" loading="lazy" lazy
        hide-on-click-modal preview-teleported>
        <template #placeholder>
            <slot name="placeholder">加载中...</slot>
        </template>
        <template #error>
            <slot name="error">加载失败</slot>
        </template>
        <template #viewer>
            <slot name="viewer"></slot>
        </template>
    </el-image>
</template>

<script setup lang="ts">
import type { MyImageType } from './types';

defineProps<{
    /** el-image 的 props 属性 */
    imageProps: MyImageType
}>()

</script>

<style scoped></style>